import {
  Controller,
  Get,
  Post,
  Body,
  Query,
  Header,
  UseGuards,
  Request,
} from '@nestjs/common';
import { JobService } from './job.service';
import { AuthGuard } from '@nestjs/passport';

@UseGuards(AuthGuard('jwt'))
@Controller('job')
export class JobController {
  constructor(private readonly jobService: JobService) {}
  //保存创建角色
  @Post('/saveJob')
  async saveJob(@Body() param) {
    return await this.jobService.saveJob(param);
  }
  @Post('/saveJobList')
  async saveJobList(@Body() param) {
    return await this.jobService.saveJobList(param);
  }
  //查询角色
  @Get('/getJob')
  async getJob(@Query() param) {    
    return await this.jobService.getJob(param);
  }
  //查询角色列表
  @Post('/getJobList')
  async getJobList(@Body() param) {
    return await this.jobService.getJobList(param);
  }
  //批量删除角色
  @Post('/delJobList')
  async delJobList(@Body() param) {
    return await this.jobService.delJobList(param);
  }
}
